package com.链表;

public class 改变节点 {
    static class Solution{
        public ListNode change(ListNode head){
            ListNode dummy = head;
            dummy = dummy.next.next;
            dummy.val = 330;
            dummy.next = null;
                        return head;
        }
    }

    public static void main(String[] args) {
        Solution solution  = new Solution();
        ListNode head = new ListNode(new int[]{1,2,3,4,5});
        solution.change(head);
    }
}
